<template>
  <div v-if="model&&model.modelKey=='lunbo'" :key="model.modelKey" class="model_box lunbo-box">
    <div class="lunbo-box-inner" v-if="model.list&&model.list.length">
      <el-carousel height="96px">
        <el-carousel-item v-for="(item,i) in model.list" :key="i">
          <img class="lunboimg" :src="item.img" alt="">
        </el-carousel-item>
      </el-carousel>

    </div>
    <div v-else  class="lunbo-box-inner" style="height: 140px;">
      <div  >
        <el-empty style="margin: 0 auto;padding: 0;" :image-size="80" description="暂无轮播图"></el-empty>
      </div>
    </div>
    <zhezhao @clickSet="clickItem('set')"></zhezhao>
  </div>
</template>

<script>
import zhezhao from '../zhezhao.vue';
export default {
  components:{zhezhao},
  props: {
    model: {
      type: Object,
      default: () => ({}),
    },
  },
  methods: {
    clickItem(type) {
      this.$emit('clickItem', {type: type, modelKey: this.model.modelKey})
    }
  }
};
</script>
<style lang="scss" scoped>
.lunbo-box {
  .lunbo-box-inner {
    background-color: #fff;
    overflow: hidden;
    border-radius: 8px;
  }
  .lunboimg {
    width: 100%;
    height: 96px;
  }
}
</style>